﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ERPStore.Localization.EventConsumers
{
	public class RegisteredRoutesEventMessage : EventBrokR.IConsumer<ERPStore.Web.Events.RegisteredRoutesEvent>
	{
		public RegisteredRoutesEventMessage(Services.LocalizationService localizationService)
		{
			this.LocalizationService = localizationService;
		}

		protected Services.LocalizationService LocalizationService { get; private set; }

		public void Handle(ERPStore.Web.Events.RegisteredRoutesEvent eventMessage)
		{
			// Ajout des routes localisées
			LocalizationService.LocalizeRoutes(System.Web.Routing.RouteTable.Routes);
		}

	}

}
